package bb.lanxing.util.img;

import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;

public class LocalFile implements Parcelable {
    public static final Parcelable.Creator<LocalFile> CREATOR = new Parcelable.Creator<LocalFile>() {
        @Override
        public LocalFile createFromParcel(Parcel parcel) {
            return new LocalFile(parcel);
        }

        @Override
        public LocalFile[] newArray(int i) {
            return new LocalFile[i];
        }
    };
    private String id;
    private String path;
    private long time;
    private Uri uri;

    @Override
    public int describeContents() {
        return 0;
    }

    public Uri getUri() {
        return this.uri;
    }

    public void setUri(Uri uri) {
        this.uri = uri;
    }

    public String getId() {
        return this.id;
    }

    public void setId(String str) {
        this.id = str;
    }

    public String getPath() {
        return this.path;
    }

    public void setPath(String str) {
        this.path = str;
    }

    public long getTime() {
        return this.time;
    }

    public void setTime(long j) {
        this.time = j;
    }

    public int hashCode() {
        String str = this.id;
        int i = 0;
        if (str != null) {
            i = 0 ^ str.hashCode();
        }
        Uri uri = this.uri;
        if (uri != null) {
            i ^= uri.hashCode();
        }
        String str2 = this.path;
        return str2 != null ? i ^ str2.hashCode() : i;
    }

    public boolean equals(Object obj) {
        if (obj instanceof LocalFile) {
            LocalFile localFile = (LocalFile) obj;
            String str = this.path;
            if (str != null) {
                return str.equals(localFile.getPath());
            }
            Uri uri = this.uri;
            if (uri == null) {
                return false;
            }
            return uri.equals(localFile.getUri());
        }
        return super.equals(obj);
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeParcelable(this.uri, i);
        parcel.writeString(this.id);
        parcel.writeString(this.path);
        parcel.writeLong(this.time);
    }

    public LocalFile() {
    }

    protected LocalFile(Parcel parcel) {
        this.uri = (Uri) parcel.readParcelable(Uri.class.getClassLoader());
        this.id = parcel.readString();
        this.path = parcel.readString();
        this.time = parcel.readLong();
    }
}
